<?php
namespace app\index\model;
use think\Db;
use think\Model;
class Brands extends Model
{
    protected $table = 'shop_brand';//表名
    protected $tables = 'shop_type';//表名
   function show(){
		return Db::table($this->table)->select();
	}
   function deleteData($id){
     	return Db::table($this->table)->where('brand_id' ,'IN',$id)->delete();
  }
   function insertData($data)
	{
	   return Db::table($this->table)->insertGetId($data);
	}
  function product_show(){
     return Db::table($this->tables)->select();
  }
  function findData($id)
 {
     return Db::table($this->table)->where('brand_id','=',$id)->find();
 }
  function updateData($data,$id){
    return Db::table($this->table)->where('brand_id','=',$id)->update($data);
  }
}
